package cz.proks.easyhelpdesk.gwt.ui.composite;

import com.google.gwt.user.client.ui.ResizeComposite;

import cz.proks.easyhelpdesk.gwt.ui.base.RestrictedView;
import cz.proks.easyhelpdesk.gwt.ui.layout.IsMainLayoutPanel;

public abstract class RestrictedComposite extends ResizeComposite implements RestrictedView {
    protected abstract IsMainLayoutPanel getRootPanel();

    @Override
    public String getUserFullName() {
        return getRootPanel().getHeaderPanel().getUserFullName();
    }

    @Override
    public void setUserFullName(String userFullName) {
        getRootPanel().getHeaderPanel().setUserFullName(userFullName);        
    }

    @Override
    public void setUserTargetToken(String targetToken) {
        getRootPanel().getHeaderPanel().setUserTargetToken(targetToken);        
    }

    @Override
    public void setLogoutTargetToken(String targetToken) {
        getRootPanel().getHeaderPanel().setLogoutTargetToken(targetToken);
    }            
}
